package de.hsb.ai.devil.util;

/**
 * Result holds a result of type {@code T}.
 * It allows to wait for the result
 *
 * @param <T>
 */
public class Result<T> {

	private T v;

	private boolean isset;

	public synchronized void set(T value) {
		v = value;
		isset = true;
	}

	public synchronized T get(T dflt) {
		return isset ? v : dflt;
	}


}
